Service-function chaining using extended service-function chain proxy for service-function offload

ABSTRACT

An extended service-function chain (SFC) proxy is hosted on a network node and connected to a service path formed by one or more network nodes hosting a chain of service-functions applied to packets traversing the service path. The packets each include a service header having a service path identifier and a service index. A packet of a traffic flow destined for a service-function is received from the service path and sent to the service-function. An indication to offload the traffic flow is received from the service-function. The indication is stored in a flow table having entries each identifying a respective traffic flow. A subsequent packet of the traffic flow is received from the service path. The flow table is searched for the indication to offload the traffic flow. Upon finding the indication, the service-function is bypassed, and the subsequent packet is forwarded along the service path.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/483,534, filed Apr. 10, 2017, the entirety of which is incorporatedherein by reference.

TECHNICAL FIELD

The present disclosure relates to service-function chains.

BACKGROUND

Network services are widely deployed in networks. Such network servicesmay be defined as service-functions that form a “service-functionchain.” A service-function chain is a sequence of service-functionshosted on a set of service nodes and that are applied to data packetstraversing the service-functions. Internet Engineering Task Force (IETF)Request for Comments (RFC) 7665 defines a service-function chainingarchitecture; however, RFC 7665 does not support a variety ofservice-function chain deployment or use cases. Such unsupported usecases include a receive-only service-function, traffic flow offloadingby a service-function, load balancing across a cluster of statefulservice-function instances, a service-function that performs networkaddress translation (NAT) and/or port address translation (PAT), and aservice-function that performs service path reclassification.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an example computing environment configuredto implement service-function chaining using an extendedservice-function chain (SFC) proxy, in accordance to an exampleembodiment.

FIG. 2 is an illustration of a receive-only embodiment ofservice-function chaining using the extended SFC proxy, in accordance toan example embodiment.

FIG. 3 is a flowchart of operations performed by the extended SFC proxyin the receive-only embodiment, in accordance to an example embodiment.

FIG. 4 is an illustration of service-function chaining using theextended SFC proxy to support an offloading embodiment, in accordance toan example embodiment.

FIG. 5 is a flowchart of operations performed by the extended SFC proxyin the offloading embodiment, in accordance to an example embodiment.

FIG. 6 is an illustration of service-function chaining using theextended SFC proxy to support a load balancing embodiment, in accordanceto an example embodiment.

FIG. 7 is a flowchart of operations performed by the extended SFC proxyin the load balancing embodiment, in accordance to an exampleembodiment.

FIG. 8 is an illustration of service-function chaining using theextended SFC proxy to support a network address translation (NAT)embodiment, in accordance to an example embodiment.

FIG. 9 is a flowchart of operations performed by the extended SFC proxyin the NAT embodiment, in accordance to an example embodiment.

FIG. 10 is an illustration of service-function chaining using theextended SFC proxy to support a reclassification embodiment, inaccordance to an example embodiment.

FIG. 11 is a flowchart of operations performed by the extended SFC proxyin the reclassification embodiment, in accordance to an exampleembodiment.

FIG. 12 is an illustration of a format of a packet traversing a servicepath, according to an example embodiment.

FIG. 13 is a flow chart of a high-level method combining the methods ofFIGS. 9 and 11, according to an example embodiment.

FIG. 14 is a block diagram of a computer system configured to host theextended SFC proxy, one or more service-functions in a service-functionchain, and a service-function forwarder, in accordance to an exampleembodiment.

DESCRIPTION OF EXAMPLE EMBODIMENTS Overview

An extended service-function chain (SFC) proxy supports service-functionchaining deployments including one or more of a receive-onlyservice-function, an offloading service-function, a statefulservice-function with load balancing across multiple instances of theservice-function, a network address translation (NAT) service-function,and a reclassification service-function.

In an offloading embodiment in which the extended service-function chain(SFC) proxy supports the offloading service-function, the extended SFCproxy is hosted on a network node and connected to a service path formedby one or more network nodes hosting a chain of service-functionsapplied to packets traversing the service path. The packets each includea service header having a service path identifier and a service index. Apacket of a traffic flow destined for a service-function among theservice-functions is received from the service path. The packet is sentto the service-function. An indication to offload the traffic flow isreceived from the service-function. The indication is stored in a flowtable having entries each identifying a respective traffic flow handledby the extended SFC proxy. A subsequent packet of the traffic flow isreceived from the service path. The flow table is searched for theindication to offload the traffic flow. Upon finding the indication, theservice-function is bypassed, and the subsequent packet is forwardedalong the service path.

Example Embodiments

RFC 7665 defines a service-function chaining architecture.Service-function chaining involves intercepting traffic (i.e., packets)and steering the traffic through a series or chain of service-functions(SFs) applied to the traffic. A service-function chain (SFC) is anordered sequence of service-functions (e.g., firewall, serverload-balancer, NAT, and the like) formed by a set of service nodes(i.e., physical or virtual devices) that host the service-functions. TheSFC is defined by a service controller in terms of the service-functionsto be applied to traffic. The traffic is intercepted through the use ofclassifier functions at nodes (i.e., switches, routers, etc.) that serveas end nodes to the SFC. The node that executes the classifier functionmay be referred to as a “classifier” or “classifier node.” In general,the traffic is steered from the classifier through the service-functionsusing one or more Layer 2 (L2)/Layer 3 (L3) service overlays in thenetwork. The L2/L3 service layer may be implemented in service-functionforwarding logic (also referred to as a “service-function forwarder”(SFF)) hosted on the service nodes together with one or moreservice-functions, or on separate nodes that do not hostservice-functions.

The classifier encapsulates traffic with a network service header (alsoreferred to as a “service function header,” or more simply as a “serviceheader”) to assist with forwarding of the traffic along the SFC. Theservice header enables the carrying of service metadata in addition tothe original data/payload. The service header includes informationspecifically formatted for consumption by each service-function-chainaware service-function that is configured to interpret and handle theservice header. The information in the service header may include, forexample: an application identifier (ID); flow or service path ID (SPID)identifying a service path; a service index (SI) normally set to aninitial value at the classifier and then decremented by aservice-function-chain aware service-function; a client or user ID;network classification information used for deriving targeted servicepolicies and profiles; and additional metadata that can be passed to theservice-functions further down the service-path. Service-functionsbenefit from the information and metadata derived both from the networkas well as the service-functions that form a given SFC. The informationand metadata can also be passed between network nodes and be used, forexample, to determine forwarding state at the end of a service chain.

The service-function chaining architecture defined in RFC 7665 does notsupport any of the following SFC deployment/use cases:

-   -   a. A receive-only (RO) service-function (e.g., an intrusion        detection service (IDS). The receive-only service-function        consumes a packet received from the SFF. This prevents the        packet from traversing necessary remaining service hops in the        service path.    -   b. Flow offload from a service-function. When a service-function        indicates flow offload to the SFF, the SFF needs to bypass the        service-function and forward packets to a next service-function        in the service path. This requires that the service index be        decremented to lookup the next service-function. Decrementing        the service index is not a function performed by the SFF.    -   c. Load balancing across stateful service-function instances at        a service hop on the service path. When there is a cluster of        stateless service-function instances at a service hop, the SFF        may be able to load balance the traffic flows across the        instances in using a stateless technique. But when the        service-function is stateful, a state needs to be maintained to        associate load balanced traffic flows to the service-function        instances. Such stateful load balancing is not a function        performed by the SFF.    -   d. A service-function that performs NAT and/or PAT operations. A        service-function that performs NAT operations changes L3/L4        packet headers (e.g., IP packet headers). Thus, the flow state        on the classifier connected to the end of the service path needs        to be updated with the new L3/L4 headers so that reverse traffic        is classified, and can therefore flow correctly.    -   e. A service-function that performs service path        reclassification. A service-function that performs service path        reclassification changes the service header, including the SPID        and SI. Thus, the flow state on the classifier connected to the        end of the service path needs to be updated with the new service        path ID and service index so that the subsequent packets on both        forward and reverse traffic are classified correctly.

RFC 7665 defines a conventional service-function proxy only for handlinga special service-function that is SFC unaware, which is unable tointerpret and handle the service header encapsulating traffic in theSFC. According to RFC 7665, the SFC proxy adds or removes the serviceheader received from or sent to the SFC unaware service-function, i.e.,on behalf of the SFC unaware service-function. The SFC proxy and the SFCunaware service-function together form a “regular” or “normal”service-function that is able to participate in the SFC. The capabilityof the SFC proxy is limited to the aforementioned operations.

Accordingly, techniques presented herein introduce an extended SFC proxy(also referred to as simply a “proxy”) that extends thefunctionality/capabilities of the conventional SFC proxy, beyond thelimited functions of removal and insertion of the service header, so asto handle SFC deployment/use cases (a)-(e) listed above. Thus, in thesupport of use cases (a)-(e) in the SFC, the extended service-functionproxy:

-   -   a. In a receive-only embodiment, supports a receive-only        service-function in the SFC. In support of the receive-only        service-function, the extended SFC proxy performs packet        replication, among other functions.    -   b. In a flow offloading embodiment, supports flow offload for a        service-function. In support of the flow offload, the extended        SFC proxy provides a “cut-through” or bypass path for offloaded        flows.    -   c. In a load balancing embodiment, load balances among a cluster        of stateful service-function instances.    -   d. In a NAT embodiment, supports a service-function that        performs NAT/PAT.    -   e. In a reclassification embodiment, supports a service-function        that performs service path reclassification.

The extended SFC proxy appears as a logical service-function (associatedwith service-functions in the service-function chain) from theperspective of the SFF, and appears as a logical SFF from theperspective of the service-function.

In terms of functionality, the extended SFC Proxy:

-   -   a. Serves the service-function and SFF in the SFC, but does not        directly apply a service to the user traffic as done by the        service-functions in the SFC.    -   b. Extends the operations of the conventional SFC proxy serving        service-functions that are not SFC aware (i.e., are not service        header aware).    -   c. Facilitates the interaction between SFC-aware        service-functions and service-function forwarder in compliance        with the SFC architecture.    -   d. Is “invisible” to the SFC from the perspective of a user        defining functionality to be provided by service-functions.    -   e. Is visible as a logical service-function in a service hop in        the service path from the perspective of the SFF.    -   f. Is visible as a logical SFF from the perspective of the        service-function.

The extended SFC proxy differs from a service-function in that it:

-   -   a. Does not decrement the SI on egress when sending a packet to        the associated service-function or forwarding a packet from the        associated-service-function to the SFF (i.e. it provides an        indirect path to the SFF). The extended SFC proxy only        decrements the service index when forwarding a packet from        ingress to egress (i.e. along a direct path to the SFF, which is        similar to a service-function operation in this case).    -   b. Is not part of a SFC.    -   c. Is part of a service path by being combined with the        associated service-function.

The extended SFC Proxy differs from the conventional SFC proxy in thatit:

-   -   a. Serves an associated service-function which is service-header        aware (and thus SFC aware).    -   b. Selectively decrements or does not decrement the SI,        depending on different cases in which the extended SFC proxy is        used.    -   c. Does not remove or insert SFC encapsulation (i.e., the        service header) for the associated service-function as is done        by the conventional SFC proxy, i.e., performs its functions        without removing or inserting the service header.    -   d. Provides additional functions above those provided by the        conventional SFC proxy, as described above and in further detail        below.

Reference is now made to FIG. 1 for a description of an examplecomputing network 110 in which the techniques presented herein may beemployed. The computing network 110 comprises a service controller 120,classifier nodes (i.e., “classifiers”) 130 and 132, and multiple servicenodes 135 and 140. Classifier nodes 130 and 132 are in communicationwith the service controller 120 and a network 160. The service nodes 135and 140 are also connected to the network 160. The service nodes 135 and140 are sometimes referred to herein as network nodes, and theclassifier nodes 130 and 132 may also be referred to as head-end nodes.

The service nodes 135 and 140 each host/support one or moreservice-functions for application to the payload of traffic passingthrough the respective service node. More specifically, service node 135hosts service-functions 165(1) (service-function f₁), 165(2)(service-function f₂), and 165(3) (service-function f₃), while servicenode 140 hosts service-functions 165(3) (service-function f₃), 165(5)(service-function f₅), 165(6) (service-function f₆), and 165(7)(service-function f₇). Service-functions may appear in multipleinstances on different service nodes or on the same service node. Forexample, service-function f₃ is hosted on each of the service nodes 135and 140.

Service nodes 135 and 140 also host an SFF 168 configured to receivetraffic from and send traffic to the service-functions forming a chainof service-functions in order to forward the traffic along a specifiedservice path implementing a SFC. SFF 168 forwards the traffic based oninformation in traffic packets, including L2/L3/L4 information innetwork packet headers and SPIDs and SIs in service headersencapsulating the packets, for example. The service nodes 135 and 140also host advertisement logic 180. In operation, the advertisement logic180 at each of the service nodes 135 and 140 is configured to generatean advertisement or notification that indicates the service-functionsthat the respective service node hosts (i.e., each service node exposesits service-functions to the service controller).

The service controller 120 is configured to define one or more SFCs forselection by each of classifiers 130 and 132. The selection of thelocation where the service-functions are available is performed at theclassifiers 130 and 132.

Each of classifiers 130 and 132 is configured to dynamically selectinstances of service-functions that may form part of a SFC based onclassification rules as well as various conditions such as load,resources, etc. Due to the advertisements from service nodes 135 and140, the classifiers 130 and 132 are aware of service-functions hostedon the service nodes 135 and 140 and can map the SFCs to instances ofservice-functions.

In the example of FIG. 1, service controller 120 defines aservice-function chain SFC₁=f₁→f₂→f₆→f₇ that is available for selectionat classifiers 130 and 132. In one example, the SFCs may be constructedinitially by specifying a series of service-function classes (types)(e.g., firewall, receive-only, load balancer, NAT, path reclassifier,and deep packet inspection). For example, the service controller 120 mayobtain (via an interface, from memory, etc.) an ordered list of servicetypes. The service controller 120 may then use class/type definitions,the obtained list, and the advertised capabilities of the service nodes,to create a SFC (i.e., a chain in terms of service-functions).

Classifiers 130 and 132 intercept forward traffic 190 f and reversetraffic 190 r, respectively, for steering through a SFC defined byservice controller 120. Using information (e.g., rules, policies, etc.)provided by service controller 120, each of classifiers 130 and 132determines that traffic 190 f, 190 r should be steered through aservice-function chain SFC₁. More specifically, classifiers 130 and 132each map the selected service-functions (i.e., the service-functionsforming the selected service-function chain SFC₁) to actual servicenodes. This mapping is designed to select the instances of theservice-functions that will be applied as part of the SFC (i.e., whichinstances of service-functions will actually be used to service theparticular traffic 190 f and 190 r).

A service path implementing service-function chain SFC₁ is shown in FIG.1 by broken-line 192. The classifier 130 sends forward traffic 190 falong the path 100 in a forward direction with the assistance of one ormore L2/L3/L4 service overlays in the network implemented via SFFs 168.In other words, a service header is appended to the traffic 190 f forforwarding through the traffic through the service-function chain andthe service header enables the carrying of service metadata in additionto the original data/payload. Similarly, classifier 132 sends reversetraffic 190 r along the path 100 in a reverse direction using theL2/L3/L4 service overlays in the network.

In certain circumstances, a service-function (e.g., a NATservice-function) may change a flow specification or “flow tuple” (e.g.,the 5-tuple comprises the source IP address, destination IP address,source port number, destination port number and the protocol in use) ofprocessed packets. That is, traffic may be received at a NATservice-function with an original 5 tuple, but, after processing at theNAT service-function, the traffic will include a new/different 5 tuple.When the flow specification of traffic is changed, the traffic may beprocessed by different service-functions than those identified in theinitial SFC.

In other circumstances, a service-function (e.g., a reclassifierservice-function) may reclassify a flow by changing the service headerencapsulating the flow. That is, traffic may arrive at a reclassifierservice-function with an original service header including an originalSPID and SI tuple, but, after processing at the reclassifierservice-function, the traffic will include a new service headerincluding a new/different SPID and SI tuple. When the flow specificationof traffic is changed, the traffic may need to be processed by differentservice-functions than those identified in the initial SFC.Service-functions that are capable of changing the flow specification oftraffic and/or classification (i.e., service header) encapsulatingtraffic are referred to as “modifying” service-functions. For example,the NAT service-function and the reclassifier service-function are bothmodifying service-functions.

In accordance with techniques presented herein, computing network 110includes an extended SFC proxy node 194 connected to/in service path 192and configured to communicate with network 160. Proxy node 194 hostslogic to implement an extended SFC proxy configured to handle SFCdeployment/use cases (a)-(e) listed above, in addition to theconventional SFC proxy operations. In the example of FIG. 1, extendedSFC proxy 196 is hosted on its own node. It is understood, however,extended SFC proxy 196 may share a service node with SFF 168 and one ormore of service-functions 165. Also, extended SFC proxy 196 may beconnected between different ones of service-functions 165 than thoseshown in FIG. 1, depending on which of the service-function need thesupport of the extended SFC proxy.

Use cases/embodiments (a)-(e) employing extended SFC proxy 196 are nowdescribed in detail in connection with FIGS. 2-11.

With reference to FIG. 2, there is an illustration of a layeredarchitecture 200 for service-function chaining for the receive-onlyembodiment (a), in which extended SFC proxy 196 supports receive-onlyservice-functions. Layered architecture 200 represents aservice-function chaining functional overlay for computer network 110,including (i) a service-function chain of sequentially appliedservice-functions SF1, SF2, and SF3 (e.g., any three ofservice-functions 165 from FIG. 1) occupying a top layer, in whichservice-function SF2 represents a receive-only service-function, (ii)SFF 168 occupying a bottom layer, and (iii) extended SFC proxy 196occupying a middle or “helper” layer between the service-function chainand the SFF.

In operation, classifier 130 encapsulates traffic (i.e., packets) 190 fwith a service header including SPID=10 and SI=255, represented as“SPID/SI 10/255” in FIG. 2. The SPID and the SI are collectivelyreferred to as a “classification tuple” or a “service path tuple.” Thetraffic, once encapsulated, flows along a serpentine service path(depicted as sequential arrows in FIG. 2) through SFF 168 andservice-functions SF1-SF3 in sequence.

SFF 168 includes a series of forwarding tables (each labeled “FWD TableLookup” in FIG. 1) that determine and steer the traffic toward nextservice hops (i.e., service-functions) along the service path inaccordance with the encapsulation on, and flow tuples in, the traffic.FIG. 2 shows “forward traffic,” i.e., traffic forwarded along theservice path in a forward direction (i.e., from left-to-right in FIG.2); however, it is understood that the service path also supportsreverse traffic based on the classification tuples and flow tuples inthe traffic.

Extended SFC proxy 196, connected in the service path between SFF 168and receive-only service-function SF2, serves all service-functionsrequiring receive-only support at a service hop. The service pathdepicted in FIG. 3 implements the SFC defined as: SF1→SF2 (via extendedSFC proxy)→subsequent SFs.

Operations performed by SFC proxy 196 in the receive-only embodiment arenow described with continued reference to FIGS. 1 and 2, and also withreference to FIG. 3, which shows a flowchart 300 of the operations.

At 302, extended SFC proxy 196 receives from SFF 168 a packet in aforward traffic flow intended for receive-only service-function SF2.

At 304, extended SFC proxy 196 replicates the packet and sends thereplicated packet to receive-only service-function SF2 withoutdecrementing the service index in the packet. Receive-onlyservice-function SF2 consumes the packet.

At 306, extended SFC proxy 196 decrements the service index in thepacket, and sends to SFF 168 the packet with the decremented serviceindex, for forwarding to the next service-function.

A summary of operations performed by extended SFC proxy 196 in method300 include packet replication, packet forwarding to receive-onlyservice-function SF2 without SI decrement, and packet forwarding to SFF168 with SI decrement for forwarding to next SF.

With reference to FIG. 4, there is an illustration of a layeredarchitecture 400 for service-function chaining for the offloadingembodiment (b), in which extended SFC proxy 196 supports trafficoffloading at service-function SF2. Extended SFC proxy 196, connectedbetween SFF 168 and offloading service-function SF2, serves allservice-functions that support traffic offloading at a service hop. Theservice path implements the service-function chain defined as: SF1→SF2(via extended SFC proxy)→SF3 (via extended SFC proxy).

Operations performed in the offloading embodiment assume extended SFCproxy 196 maintains a flow table 404 having entries each storing arespective flow tuple, copied from a network protocol header of a packetin a flow, identifying the flow handled by the extended SFC proxy. Eachtime extended SFC proxy 196 recognizes a new flow, the extended SFCproxy creates a new entry, e.g., a flow tuple, in the flow table forthat new flow.

Operations performed by SFC proxy 196 in the offload embodiment are nowdescribed with continued reference to FIGS. 1 and 4 (in which variousoperations/transactions are labeled with encircled numerals “1”-“5”),and also with reference to FIG. 5, which shows a flowchart 500 of theoperations.

At 502 (operation “1” in FIG. 4), extended SFC proxy 196 receives fromSFF 168 a packet of a flow (identified by the flow tuple in the packetheader), and sends the packet to service-function SF2 withoutdecrementing the service index in the packet.

At 504 (operation “2” in FIG. 4), service-function SF2 makes a decisionto offload flow and sends to extended SFC proxy 196 (i) a messageincluding an offload indication, and (ii) the (processed) packet withthe service index decremented.

At 506 (operation “3” in FIG. 4), upon receiving the message and thepacket from service-function SF2, extended SFC proxy 196 creates anoffload flow entry in flow table 404, e.g., stores the offloadindication in the flow table alongside the flow tuple identifying theflow. Extended SFC proxy 196 sends the packet, without decrementing theservice index, to SFF 168 for forwarding of the packet along the servicepath.

At 508 (operations “4” and “5” in FIG. 4), classifier 130 injects a newpacket of the flow into the service path in the forward direction, andextended SFC proxy 196 receives the new packet from SFF 168.

At 510, upon receiving the new packet of the flow, extended SFC proxy196 determines whether to offload the flow. To do this, extended SFCproxy 196 searches flow table 404 for an offload indication associatedwith the flow. For example, extended SFC proxy 196 uses the flow tuplein the header of the new packet as an index into flow table 404 tolocate the entry for the flow, and examines the located entry for thepresence of an offload indication. In this case, the indicator is there,and extended SFC proxy 196 determines that the flow needs to beoffloaded.

At 512 (operation “6” in FIG. 4), as a result of determining to offloadthe flow, extended SFC proxy 196 bypasses service-function SF2,decrements the service index in the new packet, and sends the new packetwith the decremented index to SFF 168 for forwarding of the packet alongthe service path (operation “7” in FIG. 4).

A summary of operations performed by extended SFC proxy 196 in method500 includes offload flow table management, handling of an offloadindication from offloading service-function SF2, packet forwarding toand from the offloading service-function (no SI decrement), and packetoffloaded to the next service-function (with SI decrement).

With reference to FIG. 6, there is an illustration of a layeredarchitecture 600 for service-function chaining for the load balancingembodiment (c), in which extended SFC proxy 196 supports load balancingat a service-function SF2 including multiple (i.e., a cluster of)stateful service-function instances SF2-A and SF2-B, across which loadbalancing may be performed. Extended SFC proxy 196, connected betweenSFF 168 and service-function SF2, serves all service-functions thatsupport load balancing at a service hop. In the load balancingembodiment, the service path implements the service-function chaindefined as: SF1→SF2 (via extended SFC proxy)→SF3.

Extended SFC proxy 196 hosts a service-function instance monitor 602configured to select one of service-function instances SF2-A or SF2-B toserve a given flow for purposes of load balancing based on aload-balancing criterion. Extended SFC proxy 196 also maintains a flowload balancing (LB) table 604 similar to flow table 404. Flow LB table604 has entries each including a respective flow tuple identifying aflow handled by the extended SFC proxy. Each entry also includes anassociated LB indicator to indicate which service-function instance wasselected to serves the flow identified in the entry.

Operations performed by SFC proxy 196 in the load balancing embodimentare now described with continued reference to FIGS. 1 and 6, and alsowith reference to FIG. 7, which shows a flowchart 700 of the operations.

At 702, extended SFC proxy 196 receives from SFF 168 a packet of a flow.

At 704, extended SFC proxy 196 load balances across the service-functioninstances SF2-A and SF2-B, e.g., monitor 602 selects one of theservice-function instances to serve the flow based on the load balancingcriterion. In response to the selection, extended SFC proxy 196 createsa new flow LB entry in flow LB table 604 for the flow. The flow LB entryidentifies the flow (e.g., includes a flow tuple for the flow) and alsoincludes an indicator of the selected instance to serve the flow, thuscausing the flow to be “pinned” to the selected service-functioninstance.

At 706, for each packet in the flow received from SFF 168 (including theone received at (702)), extended SFC Proxy 196 searches the flow LBtable (i.e., does flow LB lookup) to determine to which service-functioninstance to send the packet, i.e., which service-function was selectedto serve the flow for purposes of load balancing. Extended SFC proxy 196sends the packet, without decrementing the packet, to the selectedservice-function instance found in the search of the flow LB table.

At 708, when extended SFC proxy 196 receives the (processed) packet backfrom the selected service-function instance with a decremented serviceindex, the extended SFC proxy sends to SFF 168 the packet withoutdecrementing the service index, for forwarding of the packet along theservice path.

A summary of operations performed by extended SFC proxy 196 in method700 includes service-function instance load balancing, service-functioninstance health and load monitoring, packet forwarding to a selectedservice-function instance with no SI decrement, and packet return to SFF168 with no SI decrement.

With reference to FIG. 8, there is an illustration of a layeredarchitecture 800 for service-function chaining in the NAT embodiment(d), in which extended SFC proxy 196 supports NAT/PAT performed atservice-function SF2 prior to the extended SFC proxy 196 in the servicepath. Extended SFC proxy 196, connected in-line with SFF 168 and notdirectly to SF2, serves all service-functions that support NAT at aservice hop. The service path implements the service-function chaindefined as: SF1→SF2 (NAT/PAT operation).

Operations performed in the NAT embodiment assume extended SFC proxy 196maintains flow table 404, as mentioned above in connection with theoffload embodiment. Operations performed by SFC proxy 196 in the NATembodiment are now described with continued reference to FIGS. 1 and 8,and also with reference to FIG. 9, which shows a flowchart 900 of theoperations.

At 902, extended SFC proxy 196 receives (from SFF 168) a packet of aflow, traversing the service path in the forward direction towardclassifier 132 connected to the end of the service path, fromservice-function SF2 that may have performed NAT on the packet, i.e.,changed an original flow tuple to a new flow tuple (i.e., the currentflow tuple) in the network protocol packet header. The packet alsocarries the original flow tuple in the metadata of the service headerencapsulating the packet. The original flow tuple may have been storedin the metadata by any of the service-functions prior to extended SFCproxy, or even by classifier 130.

At 904, extended SFC proxy 196 begins the determination of whether aflow state of an egress side/port of classifier 132 needs to be updatedwith a new flow tuple (i.e., the current flow tuple) due to NATperformed on the flow by service-function SF2, to enable packets totraverse the service path in the reverse direction away from classifier132, i.e., from classifier 132 to classifier 130. In other words,extended SFC proxy 196 determines whether service-function SF2 performedthe NAT operation. To do this, extended SFC proxy 196 compares theoriginal flow tuple stored in the metadata to the (possibly new) flowtuple in the network protocol packet header.

At 906, if the compare indicates that the original flow tuple in themetadata differs from the flow tuple in the network protocol packetheader, i.e., that service-function SF2 performed NAT on the flow,extended SFC proxy 196 searches the flow table to determine whether thenew flow tuple in the network protocol packet header exists in the flowtable, i.e., was previously recorded in the flow table by the extendedSFC proxy. To do this, extended SFC proxy 196 searches the flow tablefor an entry matching the new flow tuple.

At 908, if the search does not find the new flow tuple in the flowtable, indicating that the flow does not exist, extended SFC proxy 196sends a message including the new flow tuple (i.e., the current flowtuple in the network protocol packet header) and the service headerencapsulating the packet to classifier 132. Extended SFC proxy 196 maysend the message in an out-of-band channel (i.e., a communication linkthat is not part of the service path) to classifier 132. Responsive toreceipt of the message, classifier 132 updates the egress side/port ofthe classifier 132 to create a flow along the service path in thereverse direction. Reverse traffic from classifier 132 passes throughextended SFC proxy 196 without undergoing the operations described inthis embodiment.

At 910, extended SFC proxy 196 decrements the service index in theservice header and sends the packet, with the service index decremented,to SFF 168 for forwarding along the service path in the forwarddirection.

With reference to FIG. 10, there is an illustration of a layeredarchitecture 1000 for service-function chaining in the reclassificationembodiment (e), in which extended SFC proxy 196 supportsreclassification on traffic performed by service-function SF1 prior tothe traffic arriving at extended SFC proxy 196 in the service path.Extended SFC proxy 196, connected in-line with SFF 168 and not directlyto SF1 or SF2, serves all service-functions that supportreclassification at a service hop. The service path implements theservice-function chain defined as: SFC: SF1 (service pathreclassification)→SF2→extended SFC proxy.

Operations performed in the reclassification embodiment assume extendedSFC proxy 196 maintains flow table 404. Operations performed by SFCproxy 196 in the reclassification embodiment are now described withcontinued reference to FIGS. 1 and 10, and also with reference to FIG.11, which shows a flowchart 1100 of the operations.

At 1102, extended SFC proxy 196 receives (from SFF 168) a packet of aflow, traversing the service path in the forward direction towardclassifier 132, from service-function SF1 that may have performedservice path reclassification on the packet, i.e., changed the originalSPID and SI tuple (i.e., an original classification tuple) in theservice header to a new SPID and SI tuple (i.e., a new classificationtuple). The packet also carries the original classification tuple in themetadata of the service header. The original classification tuple mayhave been stored in the metadata by any of the service-functions priorto extended SFC proxy 196, or even by classifier 130.

At 1104, extended SFC proxy 196 determines whether to update a flowstate of classifier 132 with a new service path classification (i.e.,service path reclassification) due to reclassification performed on theflow by service-function SF1, to enable packets to traverse the correctservice path in the reverse direction from away from classifier 132toward classifier 130. To do this, extended SFC proxy 196 compares theoriginal classification tuple stored in the metadata to the (possiblynew) classification tuple in the service header.

At 1106, if the compare indicates that the original classification tuplein the metadata differs from the current classification tuple in theservice header, i.e., that service-function SF1 reclassified the flow,extended SFC proxy 196 sends a message including the new classificationtuple and the flow tuple (from the packet header) to classifier 132.Extended SFC proxy 196 may send the message in an out-of-band channel.Responsive to receipt of the message, classifier 132 updates the egressside/port of the classifier 132 with the new classification tuple tocreate a reverse flow for the reclassified service path. Reverse trafficfrom classifier 132, encapsulated with a service header including thenew classification tuple, passes through extended SFC proxy 196 withoutundergoing the operations described in this embodiment. In anotherembodiment, extended SFC proxy 196 may be implemented as a function onclassifier 132, in which case the combined extended SFC proxy/classifieris the last service hop in the service path, and no out-of-bandmessaging is needed because the extended SFC proxy is internal to theclassifier.

At 1108, extended SFC proxy 196 decrements the service index in theservice header and sends the packet, with the service index decremented,to SFF 168 for forwarding of the packet along the service path in theforward direction.

With reference to FIG. 12, there is an illustration of a format of anexample packet 1200 traversing a service path. Packet 1200 includes anetwork packet portion 1202 encapsulated with a service header (SH)1204. Service header 1204 includes an SPID and SI 1206 supplied by aclassifier node or a reclassification service-function, and a metadatafield 1208. Metadata field 1208 may carry an original flow tuple and/oran original SPID and SI, as described above. Network packet portion 1202includes a network protocol (packet) header 1210 that carries a flowtuple (which may be changed by a NAT service-function, as describedabove) identifying a flow of which the packet is a part, and a payload1212.

With reference to FIG. 13, there is a flow chart of a high-level method1300 combining NAT method 900 and reclassification method 1100.

At 1302, extended SFC proxy 196 receives a packet of a traffic flowtraversing a service path in a forward direction toward aservice-function classifier (e.g., classifier 132) connected to an endof the service path.

At 1304, extended SFC proxy 196 determines whether a prior one of theservice-functions made a change to the packet requiring that theservice-function classifier be updated with the change to enable atraffic flow on the service path in a reverse direction. The changecould be a change to the flow tuple in the network protocol packetheader due to a NAT service function or a change to the service pathtuple due to a service path reclassification by a service-function. Inthe NAT example, extended SFC proxy 196 performs the operations in NATmethod 900. In the reclassification example, extended SFC proxy 196performs the operations in reclassification method 1100.

At 1306, if it is determined that the change was made, extended SFCproxy 196 updates the service-function classifier with the change, andotherwise does not update the service-function classifier. Seeoperations 908 and 1106 discussed above in connection with FIGS. 9 and11.

FIG. 14 illustrates an example block diagram of a computer system 1400,e.g., a switch, router, gateway, or any network device or node,configured to perform certain operations described herein. Computersystem 1400 represents any of service nodes 135 and 140, or proxy node194 in FIG. 1, and thus is configured to host one or more of extendedSFC proxy 198, SFF 168, and/or one or more service-functions. It shouldbe understood that a virtual network node would be a software-emulatedor virtualized version of what is shown in FIG. 14. Computer system 1400comprises a plurality of ports 1410(1)-1410(m), a programming interface1424, a network Application Specific Integrated Circuit (ASIC) 1415, aprocessor or central processing unit (CPU) 1422, and memory 1432. Theports 1410(1)-1410(m) receive ingress packets and output egress packetsfrom the network node. In certain examples, one or more of the ports1410(1)-1410(m) are connected to one or more networks for forwardingpacket data.

The network node ASIC 1415 directs incoming packets to ports for egressaccording to logic as well as controls from the processor 1422. Forexample, if the network node is a router, then the ASIC 1415 is a routerASIC configured for network routing functions, and if the network nodeis a switch, then the ASIC 1415 is a switch ASIC configured for networkswitch functions. The processor 1422 is a microprocessor ormicrocontroller, for example, and executes instructions for extended SFCproxy logic 198, SFF logic 168, and/or service-function logic 1465(e.g., any of service-functions f₁-f₇, SF1, SF2, and SF3) stored inmemory 1432. The logic 198, 168, and 1465 each includes instructionsthat, when executed by the processor 1422, cause the processor toperform the operations described herein with reference to the extendedSFC proxy (e.g., as described in connection with FIGS. 2-11), the SFF,and the service-functions.

The memory 1432 may include read only memory (ROM), random access memory(RAM), magnetic disk storage media devices, optical storage mediadevices, flash memory devices, electrical, optical, or otherphysical/tangible memory storage devices. In general, the memory 1432may comprise one or more tangible (non-transitory) computer readablestorage media (e.g., a memory device) encoded with software comprisingcomputer executable instructions and when the software is executed (bythe processor 1422) it is operable to perform the operations describedherein.

Memory 1432 also stores data 1470 used and generated by logic 198, 168,and 1465.

In summary, the extended SFC proxy performs the following new functionscompared to the conventional proxy defined in RFC 7665: performingpacket replication as needed; preserving the service header for theassociated service-function (i.e., the service-function behind theextended SFC proxy; maintaining flow states for statefulservice-functions and associated service-function instances; maintainingflow stickiness to the service-function instances; creating anoffloading flow entry based on demand from a service-function; examiningpackets against flow states to determine local forwarding (offloading)or passing to the associated service-function; not decrementing theservice index when sending a packet to a service-function and that wasreceived from the SFF or forwarding packet from the service-function toreturn the packet to SFF; decrementing the service index when forwardinga packet to the SFF after receiving the packet from the SFF (i.e.similar to a service-function operation); updating flow state with a newservice-path on behalf of a service-function classifier for service pathreclassification; updating flow state with a flow tuple that resultedfrom NAT on behalf of the service-function classifier for NAT/PAToperation; serving the service-function and SFF components in aservice-function chain and not directly providing a service on the usertraffic (which is served by the service-functions in the service chain);is invisible in the service-function chain (from user perspective); andis visible as a service-function in the service hop in the service path(from the SFF perspective).

The extended SFC Proxy facilitates the service-functions with specialrequirements to interact with the SFF in compliance with definedservice-function chain architecture. For a receive-onlyservice-function, an advantage is that the receive-only service-functionis in the service-function chain, simplifying service chaining policy. Asingle service-function chain policy is used to manage service-pathsregardless of whether they return packets. For flow offload, anadvantage is to maintain simplicity of the SFF and allow offloading tobe performed gracefully with high efficiency. For load balancingservice-path instances, an advantage is that the SPID space does notneed to be expanded to account for the service-path instances. That is,the clustered service-path is listed in the service path instead ofindividual service-path instances. For NAT/PAT operation, an advantageis to be able to classify the reverse traffic using the flow tuple thatunderwent NAT/PAT. For service path reclassification, an advantage is tobe able to classify subsequent traffic on both the forward and thereverse flow after the service path is changed.

Summaries of the receive-only, offload, load balance, NAT,reclassification, and combined NAT/reclassification embodiments areprovided below. Each embodiment may be implemented in the form of amethod, an apparatus, and a computer readable medium.

1. Receive-Only Embodiment

A method according to a receive-only embodiment comprises: at anextended service-function proxy hosted on a network node and connectedto a service path formed by one or more network nodes hosting a chain ofservice-functions applied to packets traversing the service path,wherein the packets each include a service header having a service pathidentifier and a service index decremented by each service-function whenapplied: receiving from the service path a packet destined for areceive-only service-function among the service-functions and, uponreceiving the packet: replicating the packet and sending the replicatedpacket to the receive-only service-function without decrementing theservice index in the replicated packet; and decrementing the serviceindex in the packet and forwarding the packet along the service path.

In the method, the sending may include sending the replicated packetwithout removing the service header from the replicated packet.

In the method:

-   -   a. the extended SFC proxy is connected between the receive-only        service-function and a service-function forwarder hosted on one        or more network nodes and configured to deliver and receive the        packets to and from the service-functions;    -   b. the receiving includes receiving the packet from the        service-function forwarder; and    -   c. the forwarding includes sending the packet to the        service-function forwarder.

An apparatus according to a receive-only embodiment comprises: a networkinterface unit; and a processor coupled to the network interface unitand configured to implement an extended SFC proxy that is configured toperform the operations of the method according to the receive-onlyembodiment.

A non-transitory computer readable storage medium according to areceive-only embodiment is encoded instructions that, when executed by aprocessor, cause the processor to implement an extended SFC proxy thatis configured to perform the operations of the method according to thereceive-only embodiment.

2. Offload Embodiment

A method according to an offload embodiment comprises: at an extendedservice-function chain (SFC) proxy hosted on a network node andconnected to a service path formed by one or more network nodes hostinga chain of service-functions applied to packets traversing the servicepath, wherein the packets each include a service header having a servicepath identifier and a service index: receiving from the service path apacket of a traffic flow destined for a service-function among theservice-functions, and sending the packet to the service-function;receiving from the service-function an indication to offload the trafficflow; storing the indication in a flow table having entries eachidentifying a respective traffic flow handled by the extended SFC proxy;receiving from the service path a subsequent packet of the traffic flow;searching the flow table for the indication to offload the traffic flow;and upon finding the indication, bypassing the service-function, andforwarding the subsequent packet along the service path.

An apparatus according to an offload embodiment comprises: a networkinterface unit to send and receive packets to and from a network; aprocessor configured to connect, via the network interface unit, with aservice path formed by one or more network nodes hosting a chain ofservice-functions applied to the packets traversing the service path,wherein the packets each include a service header having a service pathidentifier and a service index, wherein the processor is furtherconfigured to: receive from the service path a packet of a traffic flowdestined for a service-function among the service-functions, and sendthe packet to the service-function; receive from the service-function anindication to offload the traffic flow; store the indication in a flowtable having entries each identifying a respective traffic flow handledby the processor; receive from the service path a subsequent packet ofthe traffic flow; search the flow table for the indication to offloadthe traffic flow; and upon finding the indication, bypass theservice-function, and forward the subsequent packet along the servicepath.

A non-transitory computer readable storage medium according to anoffload embodiment is encoded with instructions that, when executed by aprocessor of a network node connected to a service path formed by one ormore network nodes hosting a chain of service-functions applied topackets traversing the service path, wherein the packets each include aservice header having a service path identifier and a service index,cause the processor to perform: receiving from the service path a packetof a traffic flow destined for a service-function among theservice-functions, and sending the packet to the service-function;receiving from the service-function an indication to offload the trafficflow; storing the indication in a flow table having entries eachidentifying a respective traffic flow handled by the processor;receiving from the service path a subsequent packet of the traffic flow;searching the flow table for the indication to offload the traffic flow;and upon finding the indication, bypassing the service-function, andforwarding the subsequent packet along the service path.

3. Load Balance Embodiment

A method according to a load balance embodiment comprises: at anextended service-function chain (SFC) proxy hosted on a network node andconnected to a service path formed by one or more network nodes hostinga chain of service-functions applied to packets traversing the servicepath, wherein the packets each include a service header having a servicepath identifier: receiving from the service path a packet of a trafficflow destined for a service-function among the service-functions;selecting, among multiple stateful instances of the service-function, aselected instance to serve the traffic flow based on a load balancingcriterion; storing in a load balance table an indicator of the selectedinstance; sending the packet to the selected instance; receiving fromthe service path a subsequent packet of the traffic flow destined forthe service-function; searching the load balance table for the indicatorof the selected instance; and upon finding the indicator of the selectedinstance, sending the subsequent packet to the selected instance.

The method further comprises receiving from the selected instanceprocessed versions of the packet and the subsequent packet, andforwarding the processed versions of the packet and the subsequentpacket along the service path without adding a service header to eitherthe packet or the subsequent packet.

In the method:

-   -   a. the extended SFC proxy is connected between the selected        instance of the service-function and a service-function        forwarder hosted on one or more network nodes and configured to        deliver and receive the packets to and from the        service-functions;    -   b. the receiving the packet and the receiving the subsequent        packet each includes receiving the respective packet from the        service-function forwarder; and    -   c. the forwarding the processed versions includes sending the        processed versions of the packet and the subsequent packet to        the service-function forwarder.

In the method, the sending the packet and the sending the subsequentpacket to the selected instance each includes sending the respectivepacket without removing the service header from the packet.

In the method:

-   -   a. the load balance table includes entries each identifying a        respective traffic flow handled by the extended SFC proxy and        including an associated indicator, if any, of a selected        instance to serve the identified traffic flow; and    -   b. the storing includes storing the indicator in an entry of the        load balance table identifying the traffic flow.

An apparatus according to a load balance embodiment comprises: a networkinterface unit; and a processor coupled to the network interface unitand configured to implement an extended SFC proxy that is configured toperform the operations of the method according to the load balanceembodiment.

A non-transitory computer readable storage medium according to a loadbalance embodiment is encoded with instructions that, when executed by aprocessor, cause the processor to implement an extended SFC proxy thatis configured to perform the operations of the method according to theload balance embodiment.

4. NAT Embodiment

A method according a NAT embodiment comprises: at an extendedservice-function (SFC) proxy hosted on a network node and connected to aservice path formed by network nodes hosting a chain ofservice-functions applied to packets traversing the service path, eachpacket encapsulated by a service header including a service pathidentifier and a service index: receiving a packet of a traffic flowtraversing the service path in a forward direction toward aservice-function classifier connected to an end of the service path;first determining whether network address translation by one of theservice functions changed a flow tuple of the packet identifying thetraffic flow; if network address translation changed the flow tuple,second determining whether to update the service-function classifierwith the flow tuple; and if it is determined to update, updating theservice-function classifier with the flow tuple to enable a flow on theservice path in a reverse direction.

The method further comprises: if it is determined not to update, notupdating the service-function classifier.

In the method, the updating includes sending to the service-functionclassifier via a communication channel an update message including theflow tuple and the service-path identifier.

The method further comprises:

-   -   a. decrementing the service index in the service header of the        packet and forwarding the packet along the service path without        removing the service header or adding a service header.

In the method:

-   -   a. the extended SFC proxy is connected to a service-function        forwarder hosted on one or more network nodes and configured to        deliver and receive the packets to and from the        service-functions;    -   b. the receiving includes receiving the packet from the        service-function forwarder; and    -   c. the forwarding includes sending the packet to the        service-function forwarder.

In the method:

-   -   a. the receiving includes receiving the packet with an original        flow tuple carried in metadata of the service header and the        flow tuple carried in a network protocol header of the packet;    -   b. the first determining includes determining whether the        original flow tuple in the metadata differs from the flow tuple        in the network protocol header;    -   c. if the original flow tuple in the metadata differs from the        flow tuple in the network protocol header, declaring that the        network address translation changed the flow tuple, otherwise        declaring that the network address translation did not change        the flow tuple.

In the method, the second determining includes:

-   -   a. searching a flow table, including flow tuples each        identifying a respective traffic flow seen by the extended SFC        proxy, for a flow tuple that matches the flow tuple; and    -   b. if the searching does not find a match or finds a match,        performing the updating or not performing the updating,        respectively.

An apparatus according a NAT embodiment comprises: a network interfaceunit; and a processor coupled to the network interface unit andconfigured to implement an extended SFC proxy that is configured toperform the operations of the method according to the NAT embodiment.

A non-transitory computer readable storage medium according a NATembodiment is encoded with instructions that, when executed by aprocessor, cause the processor to implement an extended SFC proxy thatis configured to perform the operations of the method according to theNAT embodiment.

5. Reclassification Embodiment

A method according to a reclassification embodiment comprises: at anextended service-function (SFC) proxy hosted on a network node andconnected to a service path formed by network nodes hosting a chain ofservice-functions applied to packets traversing the service path, eachpacket including a service header with a service path tuple including aservice path identifier and a service index: receiving a packet of atraffic flow traversing the service path in a forward direction toward aservice-function classifier connected to an end of the service path;determining whether reclassification by one of the service-functionschanged the service path tuple in the service header; and ifreclassification changed the service path tuple, updating theservice-function classifier with the service path tuple to enable a flowon a corresponding new service path in a reverse direction.

The method further comprises: if reclassification did not change theservice path tuple, not updating the service-function classifier.

In the method:

-   -   a. the receiving includes receiving the packet such that service        header includes the service path tuple and metadata in which an        original service path tuple is carried;    -   b. the determining includes determining whether the service path        tuple matches the original service path tuple carried in the        metadata;    -   c. if the service path tuple does not match the original service        path tuple carried in the metadata, declaring that the        reclassification changed the original service path tuple to the        service path tuple, otherwise declaring that reclassification        did not occur.

The method further comprises forwarding the packet along the servicepath in accordance with the service path tuple.

In the method, the updating includes sending to the service-functionclassifier via a communication channel an update message including theservice path tuple and a flow tuple from the packet identifying thetraffic flow.

An apparatus according to a reclassification embodiment comprises: anetwork interface unit; and a processor coupled to the network interfaceunit and configured to implement an extended SFC proxy that isconfigured to perform the operations of the method according to thereclassification embodiment.

A non-transitory computer readable storage medium according to areclassification embodiment is encoded with instructions that, whenexecuted by a processor, cause the processor to implement an extendedSFC proxy that is configured to perform the operations of the methodaccording to the reclassification embodiment.

6. Combined NAT/Reclassification Embodiment

A method according to a combined NAT/reclassification embodimentcomprises: at an extended service-function (SFC) proxy hosted on anetwork node and connected to a service path formed by network nodeshosting a chain of service-functions applied to packets traversing theservice path, each packet including a service header with a service pathtuple including a service path identifier and a service index: receivinga packet of a traffic flow traversing the service path in a forwarddirection toward a service-function classifier connected to an end ofthe service path; determining whether one of the service-functions madea change to the packet requiring that the service-function classifier beupdated with the change to enable a traffic flow on the service path ina reverse direction; and if it is determined that the change was made,updating the service-function classifier with the change, and otherwisenot updating the service-function classifier.

In the method, the determining includes:

-   -   a. determining whether network address translation by the one of        the service functions changed a flow tuple in the packet that        identifies the traffic flow;    -   b. if it is determined that the network address translation        changed the flow tuple, determining whether to update the        service-function classifier with the flow tuple; and    -   c. if it is determined to update the service-function classifier        with the flow tuple, updating the service-function with the flow        tuple.

In the method:

-   -   a. the receiving includes receiving the packet with an original        flow tuple carried in metadata of the service header and the        flow tuple carried in a network protocol header of the packet;        and    -   b. the determining whether the network address translation        changed the flow tuple includes:        -   i. determining whether the original flow tuple in the            metadata differs from the flow tuple in the network protocol            header; and        -   ii. if the original flow tuple in the metadata differs from            the flow tuple in the network protocol header, declaring            that the network address translation changed the flow tuple,            otherwise declaring that the network address translation did            not change the flow tuple.

In the method, the determining whether to update the service-functionclassifier with the flow tuple includes:

-   -   a. searching a flow table, including flow tuples each        identifying a respective traffic flow seen by the extended SFC        proxy node, for a flow tuple that matches the flow tuple; and    -   b. if the searching does not find a match or finds a match,        determining to perform the update or determining not to perform        the update, respectively.

In the method, the determining includes:

-   -   a. determining whether reclassification by the service-functions        changed the service path tuple in the service header; and    -   b. it is determined that reclassification changed the service        path tuple, determining to update the service-function        classifier with the service path tuple.

In the method:

-   -   a. the receiving includes receiving the packet such that service        header includes the service path tuple and metadata in which an        original service path tuple is carried;    -   b. the determining further includes determining whether the        service path tuple matches the original service path tuple        carried in the metadata; and    -   c. if the service path tuple does not match the original service        path tuple carried in the metadata, declaring that the        reclassification changed the original service path tuple to the        service path tuple, otherwise declaring that reclassification        did not occur.

In the method, the determining includes determining whether one of theservice-functions either reclassified the service path causing a changeof the service path tuple or performed network address translation onthe packet causing a change to a flow tuple in the packet.

In the method, the determining includes:

-   -   a. determining whether the service path tuple in the service        header differs from an original service path tuple carried in        metadata of the service header because of reclassification of        the service path by the one of the service-functions; and    -   b. if the service path tuples differ, declaring that the change        was made.

In the method, the determining includes:

-   -   a. determining whether a flow tuple in a network protocol header        of the packet differs from an original flow tuple carried in        metadata of the service header because of network address        translation performed by the one of the service-functions; and    -   b. if the flow tuples differ, declaring that the change was        made.

An apparatus according to a combined NAT/reclassification embodimentcomprises: a network interface unit; and a processor coupled to thenetwork interface unit and configured to implement an extended SFC proxythat is configured to perform the operations of the method according tothe combined NAT/reclassification embodiment.

A non-transitory computer readable storage medium according to acombined NAT/reclassification embodiment is encoded with instructionsthat, when executed by a processor, cause the processor to implement anextended SFC proxy that is configured to perform the operations of themethod according to the combined NAT/reclassification embodiment.

The above description is intended by way of example only. Variousmodifications and structural changes may be made therein withoutdeparting from the scope of the concepts described herein and within thescope and range of equivalents of the claims.

What is claimed is:
 1. A method comprising: at an extendedservice-function chain (SFC) proxy hosted on a network node andconnected to a service path hosting a chain of service-functions appliedto packets traversing the service path, wherein the packets eachincludes a service header having a service path identifier and a serviceindex: receiving from the service path a packet destined for areceive-only service-function among the service-functions and, uponreceiving the packet: replicating the packet, to produce a replicatedpacket; sending the replicated packet to the receive-onlyservice-function without decrementing the service index in thereplicated packet; decrementing the service index in the packet; andforwarding the packet along the service path.
 2. The method of claim 1,wherein the sending includes sending the replicated packet withoutremoving the service header from the replicated packet.
 3. The method ofclaim 1, wherein: the extended SFC proxy is connected between thereceive-only service-function and a service-function forwarder hosted onone or more network nodes and configured to deliver and receive thepackets to and from the service-functions; the receiving includesreceiving the packet from the service-function forwarder; and theforwarding includes sending the packet to the service-functionforwarder.
 4. The method of claim 1, wherein the receive-onlyservice-function consumes the replicated packet received from the SFCproxy, which prevents the replicated packet from traversing subsequentservice-functions in the chain of service-functions of the service path.5. The method of claim 1, wherein the decrementing the service index inthe packet includes decrementing the service index without removing theservice header of the packet.
 6. The method of claim 1, wherein thereceiving from the service path includes receiving the packet from aclassifier node.
 7. The method of claim 1, at each of theservice-functions excluding the receive-only service-function,decrementing the service index in each of the packets traversing theeach of the service-functions excluding the receive-onlyservice-function.
 8. An apparatus comprising: a network interface unitto send and receive packets to and from a network; and a processor of anetwork node configured to connect to a service path hosting a chain ofservice-functions applied to the packets when traversing the servicepath, wherein the packets each includes a service header having aservice path identifier and a service index, wherein the processor isfurther configured to perform: receiving from the service path a packetdestined for a receive-only service-function among the service-functionsand, upon receiving the packet: replicating the packet, to produce areplicated packet; sending the replicated packet to the receive-onlyservice-function without decrementing the service index in thereplicated packet; decrementing the service index in the packet; andforwarding the packet along the service path.
 9. The apparatus of claim8, wherein the processor is configured to perform the sending by sendingthe replicated packet without removing the service header from thereplicated packet.
 10. The apparatus of claim 8, wherein the processoris configured to: be connected between the receive-only service-functionand a service-function forwarder hosted on the network node andconfigured to deliver and receive the packets to and from theservice-functions; perform the receiving by receiving the packet fromthe service-function forwarder; and perform the forwarding by sendingthe packet to the service-function forwarder.
 11. The apparatus of claim8, wherein the receive-only service-function consumes the replicatedpacket, which prevents the replicated packet from traversing subsequentservice-functions in the chain of service-functions of the service path.12. The apparatus of claim 8, wherein the processor is configured toperform the decrementing the service index in the packet by decrementingthe service index without removing the service header of the packet. 13.The apparatus of claim 8, wherein the processor is configured to performthe receiving from the service path by receiving the packet from aclassifier node.
 14. The apparatus of claim 8, wherein each of theservice-functions excluding the receive-only service-function isconfigured to perform decrementing the service index in each of thepackets traversing the each of the service-functions excluding thereceive-only service-function.
 15. A non-transitory computer readablestorage medium encoded with instructions that, when executed by aprocessor of a network node connected to a service path hosting a chainof service-functions applied to packets traversing the service path,wherein the packets each includes a service header having a service pathidentifier and a service index, cause the processor to perform:receiving from the service path a packet destined for a receive-onlyservice-function among the service-functions and, upon receiving thepacket: replicating the packet, to produce a replicated packet; sendingthe replicated packet to the receive-only service-function withoutdecrementing the service index in the replicated packet; decrementingthe service index in the packet; and forwarding the packet along theservice path.
 16. The non-transitory computer readable storage medium ofclaim 15, wherein the instructions to cause the processor to perform thesending include instructions to cause the processor to perform sendingthe replicated packet without removing the service header from thereplicated packet.
 17. The non-transitory computer readable storagemedium of claim 15, wherein the receive-only service-function consumesthe replicated packet, which prevents the replicated packet fromtraversing subsequent service-functions in the chain ofservice-functions of the service path.
 18. The non-transitory computerreadable storage medium of claim 15, wherein the instructions to causethe processor to perform the decrementing the service index in thepacket include instructions to cause the processor to performdecrementing the service index without removing the service header ofthe packet.
 19. The non-transitory computer readable storage medium ofclaim 15, wherein the instructions to cause the processor to perform thereceiving from the service path include instructions to cause theprocessor to perform receiving the packet from a classifier node. 20.The non-transitory computer readable storage medium of claim 15, whereineach of the service-functions excluding the receive-onlyservice-function is configured to perform decrementing the service indexin each of the packets traversing the each of the service-functionsexcluding the receive-only service-function.